package renderer
{
	import mx.controls.listClasses.ListItemRenderer;

	public class Todo1ListItemRenderer extends ListItemRenderer
	{


		/**
		 *  @private
		 */
		//override public function set toolTip(value:String):void
		//{
			//nothing
			// NOTA! se sobreescribe el set del tooltip para evitar que el commitProperties() lo haga null y con ello se pierda el tooltip
		//}		
		/*
		override protected function updateDisplayList(unscaledWidth:Number,
													  unscaledHeight:Number):void
		{
			super.updateDisplayList(unscaledWidth, unscaledHeight);
		*/
		override protected function commitProperties():void
		{
			super.commitProperties();

			var textComplete:String = listData.label ? listData.label : " ";
			
			label.text = textComplete;
			
			var truncated:Boolean = label.truncateToFit();
			
			if (truncated)
				super.toolTip = textComplete;
			else
				super.toolTip = null;
			
		}
		
	}
}